/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/* sdm660-pinctrl.dtsi common diff */
&tlmm {
	msm_gpio_20:msm_gpio_20 {
		mux {
			pins="gpio20";
			function= "gpio";
		};

		config {
			pins= "gpio20";
			drive-strength = <2>;
			bias-disable;
			output-low;
		};
	};

	msm_gpio_20_output_high: msm_gpio_20_output_high {
		mux {
			pins = "gpio20";
			function = "gpio";
		};

		config {
			pins = "gpio20";
			drive-strength = <2>;
			bias-disable;
			output-high;
		};

	};

	msm_gpio_72:msm_gpio_72{
		mux {
			pins = "gpio72";
			function = "gpio";
		};

		config {
			pins = "gpio72";
			drive-strength=<2>;
			bias-pull-down;
		};
	};

	/* add pri_mi2s for smartpa */
	pri_mi2s_sck {
		pri_mi2s_sck_sleep: pri_mi2s_sck_sleep {
			mux {
				pins = "gpio12";
				function = "gpio";
			};

			config {
				pins = "gpio12";
				drive-strength = <2>;   /* 2 mA */
				bias-pull-down;         /* PULL DOWN */
				input-enable;
			};
		};

		pri_mi2s_sck_active: pri_mi2s_sck_active {
			mux {
				pins = "gpio12";
				function = "pri_mi2s";
			};

			config {
				pins = "gpio12";
				drive-strength = <8>;   /* 8 mA */
				bias-disable;           /* NO PULL */
				output-high;
			};
		};
	};

	pri_mi2s_ws {
		pri_mi2s_ws_sleep: pri_mi2s_ws_sleep {
			mux {
				pins = "gpio13";
				function = "gpio";
			};

			config {
				pins = "gpio13";
				drive-strength = <2>;   /* 2 mA */
				bias-pull-down;         /* PULL DOWN */
				input-enable;
			};
		};

		pri_mi2s_ws_active: pri_mi2s_ws_active {
			mux {
				pins = "gpio13";
				function = "pri_mi2s_ws";
			};

			config {
				pins = "gpio13";
				drive-strength = <8>;   /* 8 mA */
				bias-disable;           /* NO PULL */
				output-high;
			};
		};
	};

	pri_mi2s_sd0 {
		pri_mi2s_sd0_sleep: pri_mi2s_sd0_sleep {
			mux {
				pins = "gpio14";
				function = "gpio";
			};

			config {
				pins = "gpio14";
				drive-strength = <2>;   /* 2 mA */
				bias-pull-down;         /* PULL DOWN */
				input-enable;
			};
		};

		pri_mi2s_sd0_active: pri_mi2s_sd0_active {
			mux {
				pins = "gpio14";
				function = "pri_mi2s";
			};

			config {
				pins = "gpio14";
				drive-strength = <8>;   /* 8 mA */
				bias-disable;           /* NO PULL */
			};
		};
	};

	pri_mi2s_sd1 {
		pri_mi2s_sd1_sleep: pri_mi2s_sd1_sleep {
			mux {
				pins = "gpio15";
				function = "gpio";
			};

			config {
				pins = "gpio15";
				drive-strength = <2>;   /* 2 mA */
				bias-pull-down;         /* PULL DOWN */
				input-enable;
			};
		};

 		pri_mi2s_sd1_active: pri_mi2s_sd1_active {
			mux {
				pins = "gpio15";
				function = "pri_mi2s";
			};

			config {
				pins = "gpio15";
				drive-strength = <8>;   /* 8 mA */
				bias-disable;           /* NO PULL */
			};
		};
	};

		cam_actuator_vaf_active0: cam_actuator_vaf_active0 {
			/* ACTUATOR POWER */
			mux {
				pins = "gpio45";
				function = "gpio";
			};

 			config {
				pins = "gpio45";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

	cam_actuator_vaf_suspend0: cam_actuator_vaf_suspend0 {
		/* ACTUATOR POWER */
		mux {
			pins = "gpio45";
			function = "gpio";
		};

		config {
			pins = "gpio45";
			bias-pull-down; /* PULL DOWN */
			drive-strength = <2>; /* 2 MA */
		};
	};

		cam_sensor_front_b_active: cam_sensor_front_b_active {
			/* RESET */
			mux {
				pins = "gpio52","gpio40";
				function = "gpio";
			};

 			config {
				pins = "gpio52","gpio40";
				bias-disable; /* No PULL */
				drive-strength = <2>; /* 2 MA */
			};
		};

	cam_sensor_front_b_suspend: cam_sensor_front_b_suspend {
		/* RESET */
		mux {
			pins = "gpio52","gpio40";
			function = "gpio";
		};

		config {
			pins = "gpio52","gpio40";
			bias-disable; /* No PULL */
			drive-strength = <2>; /* 2 MA */
		};
	};

	f7a_touch_gpio {
		f7a_touch_reset_gpio_default: f7a_touch_reset_gpio_default {
			mux {
				pins = "gpio66";
				function = "gpio";
			};

			config {
				pins = "gpio66";
				drive-strength = <16>;
				bias-pull-up;
			};
		};

		f7a_touch_interrupt_gpio_default: f7a_touch_interrupt_gpio_default {
			mux {
				pins = "gpio67";
				function = "gpio";
			};

			config {
				pins = "gpio67";
				drive-strength = <2>;
				bias-pull-up;
			};
		};
	};
};

&wcd_usbc_analog_en2n_idle {
	mux {
		pins = "gpio75";
	};

	config {
		/delete-property/ output-high;
		pins = "gpio75";
		output-low;
	};
};

&wcd_usbc_analog_en2n_active {
	mux {
		pins = "gpio75";
	};

	config {
		/delete-property/ bias-pull-down;
		/delete-property/ output-low;
		pins = "gpio75";
		bias-disable;
		output-high;
	};
};

&cam_sensor_mclk0_active {
	config {
		drive-strength = <4>;
	};
};

&cam_sensor_mclk0_suspend {
	config {
		drive-strength = <4>;
	};
};

&cam_sensor_mclk1_active {
	config {
		drive-strength = <6>;
	};
};

&cam_sensor_mclk1_suspend {
	config {
		drive-strength = <6>;
	};
};

&cam_sensor_mclk2_active {
	config {
		drive-strength = <4>;
	};
};

&cam_sensor_mclk2_suspend {
	config {
		drive-strength = <4>;
	};
};
